package cn.anecansaitin.jep.parser.ast.node.expression.literal;

import cn.anecansaitin.jep.TokenType;
import cn.anecansaitin.jep.parser.ast.node.expression.Expression;
import cn.anecansaitin.jep.types.TypeInfo;

public abstract sealed class Literal extends Expression permits BooleanLiteral, CharLiteral, DoubleLiteral, FloatLiteral, IntLiteral, LongLiteral, NullLiteral, StringLiteral {
    private final TokenType type;

    public Literal(TokenType type, TypeInfo resultType, int line, int column) {
        super(resultType, line, column);
        this.type = type;
    }

    public TokenType type() {
        return type;
    }
}
